import { FC, Component } from 'react'
import './message.less'
import '@/css/animation.less'
import { CSSTransition } from 'react-transition-group'
type TMessageProps = {
  content: string
  type: 'info' | 'success' | 'error' | 'warnning'
}
const Message: FC<TMessageProps> = ({ content, type }) => {
  const className = 'message message-type-' + type
  return (
    <CSSTransition in={true} appear classNames="fadeIn" timeout={400}>
      <div className={className}>{content}</div>
    </CSSTransition>
  )
}
export default Message
